package animation2.view.com.zhaolixing.viewanimation2

import android.support.v7.app.AppCompatActivity
import android.os.Bundle
import android.view.animation.AnimationUtils
import kotlinx.android.synthetic.main.activity_main.*

class MainActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
        bt_scale1.setOnClickListener{
            val animation=AnimationUtils.loadAnimation(this,R.anim.scale1);
            view.startAnimation(animation)
        }
        bt_scale2.setOnClickListener{
            val animation=AnimationUtils.loadAnimation(this,R.anim.scale2)
            view.startAnimation(animation)
        }
        bt_scale3.setOnClickListener{
            val animation=AnimationUtils.loadAnimation(this,R.anim.scale3)
            view.startAnimation(animation)
        }
        bt_scale4.setOnClickListener{
            val animation=AnimationUtils.loadAnimation(this,R.anim.scale4)
            view.startAnimation(animation)
        }
        bt_scale5.setOnClickListener{
            val animation=AnimationUtils.loadAnimation(this,R.anim.scale5)
            view.startAnimation(animation)
        }
        bt_scale6.setOnClickListener{
            val animation=AnimationUtils.loadAnimation(this,R.anim.scale6)
            view.startAnimation(animation)
        }
        bt_scale7.setOnClickListener{
            val animation=AnimationUtils.loadAnimation(this,R.anim.scale7)
            view.startAnimation(animation)
        }
        bt_scale8.setOnClickListener{
            val animation=AnimationUtils.loadAnimation(this,R.anim.scale8)
            view.startAnimation(animation)
        }
        bt_scale9.setOnClickListener{
            val animation=AnimationUtils.loadAnimation(this,R.anim.scale9)
            view.startAnimation(animation)
        }
        bt_rotate1.setOnClickListener{
            val animation=AnimationUtils.loadAnimation(this,R.anim.rotate1)
            view.startAnimation(animation)
        }
        bt_rotate2.setOnClickListener{
            val animation=AnimationUtils.loadAnimation(this,R.anim.rotate2)
            view.startAnimation(animation)
        }
        bt_rotate3.setOnClickListener{
            val animation=AnimationUtils.loadAnimation(this,R.anim.rotate3)
            view.startAnimation(animation)
        }
        bt_rotate4.setOnClickListener{
            val animation=AnimationUtils.loadAnimation(this,R.anim.rotate4)
            view.startAnimation(animation)
        }
        bt_rotate5.setOnClickListener{
            val animation=AnimationUtils.loadAnimation(this,R.anim.rotate5)
            view.startAnimation(animation)
        }
        bt_rotate6.setOnClickListener{
            val animation=AnimationUtils.loadAnimation(this,R.anim.rotate6)
            view.startAnimation(animation)
        }
        bt_rotate7.setOnClickListener{
            val animation=AnimationUtils.loadAnimation(this,R.anim.rotate7)
            view.startAnimation(animation)
        }
        bt_rotate8.setOnClickListener{
            val animation=AnimationUtils.loadAnimation(this,R.anim.rotate8)
            view.startAnimation(animation)
        }
        bt_rotate9.setOnClickListener{
            val animation=AnimationUtils.loadAnimation(this,R.anim.rotate9)
            view.startAnimation(animation)
        }
        bt_alpha1.setOnClickListener{
            val animation=AnimationUtils.loadAnimation(this,R.anim.alpha1)
            view.startAnimation(animation)
        }
        bt_alpha2.setOnClickListener{
            val animation=AnimationUtils.loadAnimation(this,R.anim.alpha2)
            view.startAnimation(animation)
        }
        bt_alpha3.setOnClickListener{
            val animation=AnimationUtils.loadAnimation(this,R.anim.alpha3)
            view.startAnimation(animation)
        }
        bt_alpha4.setOnClickListener{
            val animation=AnimationUtils.loadAnimation(this,R.anim.alpha4)
            view.startAnimation(animation)
        }
        bt_alpha5.setOnClickListener{
            val animation=AnimationUtils.loadAnimation(this,R.anim.alpha5)
            view.startAnimation(animation)
        }
        bt_alpha6.setOnClickListener{
            val animation=AnimationUtils.loadAnimation(this,R.anim.alpha6)
            view.startAnimation(animation)
        }
        bt_alpha7.setOnClickListener{
            val animation=AnimationUtils.loadAnimation(this,R.anim.alpha7)
            view.startAnimation(animation)
        }
        bt_alpha8.setOnClickListener{
            val animation=AnimationUtils.loadAnimation(this,R.anim.alpha8)
            view.startAnimation(animation)
        }
        bt_alpha9.setOnClickListener{
            val animation=AnimationUtils.loadAnimation(this,R.anim.alpha9)
            view.startAnimation(animation )
        }
        bt_translate1.setOnClickListener{
            val animation=AnimationUtils.loadAnimation(this,R.anim.translate1)
            view.startAnimation(animation)
        }
        bt_translate2.setOnClickListener{
            val animation=AnimationUtils.loadAnimation(this,R.anim.translate2)
            view.startAnimation(animation)
        }
        bt_translate3.setOnClickListener{
            val animation=AnimationUtils.loadAnimation(this,R.anim.translate3)
            view.startAnimation(animation)
        }
        bt_translate4.setOnClickListener{
            val animation=AnimationUtils.loadAnimation(this,R.anim.translate4)
            view.startAnimation(animation)
        }
        bt_translate5.setOnClickListener{
            val animation=AnimationUtils.loadAnimation(this,R.anim.translate5)
            view.startAnimation(animation)
        }
        bt_translate6.setOnClickListener{
            val animation=AnimationUtils.loadAnimation(this,R.anim.translate6)
            view.startAnimation(animation)
        }
        bt_translate7.setOnClickListener{
            val animation=AnimationUtils.loadAnimation(this,R.anim.translate7)
            view.startAnimation(animation)
        }
        bt_translate8.setOnClickListener{
            val animation=AnimationUtils.loadAnimation(this,R.anim.translate8)
            view.startAnimation(animation)
        }
        bt_translate9.setOnClickListener{
            val animation=AnimationUtils.loadAnimation(this,R.anim.translate9)
            view.startAnimation(animation)
        }
    }
}
